package com.study.book.controller;

import com.study.book.common.R;
import com.study.book.pojo.Area;
import com.study.book.pojo.Carousel;
import com.study.book.service.CarouselService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "轮播图接口")
@RestController
@RequestMapping("/app/carousel")
public class CarouselController {

    @Autowired
    private CarouselService carouselService;


    @ApiOperation("获取轮播图列表")
    @GetMapping("/list")
    public R<List<Carousel>> list() {
        return R.ok(carouselService.list());
    }
}
